using System;
using System.Drawing;

namespace Camalon.Drawing.Design
{

	internal class DragDropData
	{
		public enum DragEffect
		{
	
			DrawSelectionRectangle,
		
			//Shapes
			Move,
			Resize,

			/// <summary>
			/// Scaling
			/// </summary>
			ScaleTop,
			ScaleLeft,
			ScaleRight,
			ScaleBottom,

			/// <summary>
			/// Warping
			/// </summary>
			WarpTopLeft,
			WarpTopRight,
			WarpBottomLeft,
			WarpBottomRight,
			WarpLeft,
			WarpTop,
			WarpBottom,
			WarpRight,

			/// <summary>
			/// Shearing
			/// </summary>
			ShearX,
			ShearY,

			/// <summary>
			/// Points
			/// </summary>
			EditControlPoints,
			EditPoints,


			Rotation
		}

		public CursorStatus			CursorStatus				= CursorStatus.None;
		public DragEffect			Effect						= DragEffect.DrawSelectionRectangle;
		public Point				LastMouseDown				= Point.Empty;
		public Point				CurrentMousePosition		= Point.Empty;
		public ShapeAttributes		PrimaryAttributes;
		public PointF				RotationAnchor				= PointF.Empty;
		public Size					LastContainerProviderSize	= Size.Empty;
	}

	internal struct	ShapeAttributes
	{
		public readonly RectangleF					Bounds;
		//public readonly RectangleMargins			ScalingMargins;
		public readonly	Scale			Scale;
		public readonly int				Rotation;
		public readonly Shape			Shape;
		public readonly Shear			Shear;
		public readonly Warp			Warp;
		public readonly PointF[]		ControlPoints;
		public readonly AnchorPoint[]	Points;

		public ShapeAttributes( Shape shape )
		{
			this.Bounds			= shape.Bounds;
			this.Scale			= shape.Scale;
			this.Rotation		= shape.Rotation;
			this.Shear			= shape.Shear;
			this.Shape			= shape;
			this.Warp			= shape.Warp;
			this.ControlPoints	= shape.ControlPoints;
			this.Points			= shape is VectorShape ? ((VectorShape)shape).Points:null;

		}

	}



}
